package com.xiaoxie.service.impl;

import com.xiaoxie.entity.Lexicon;
import com.xiaoxie.mapper.LexiconDao;
import com.xiaoxie.service.ILexiconService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LexiconServiceImpl implements ILexiconService {
    @Autowired
    private LexiconDao lexiconDao;

    //获取所有词本
    @Override
    public List<Lexicon> findAll(String currentAccount) {


        return lexiconDao.getAll(currentAccount);
    }

    //获取所有可访问词本
    @Override
    public List<Lexicon> showAll(String currentAccount) {
        return lexiconDao.showAll(currentAccount);
    }
    //删除词本
    @Override
    public void delete(String currentAccount, Integer id) {
        lexiconDao.deleteLexicon(currentAccount,id);
    }
}
